package yt.kpool.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.king.base.adapter.ViewHolderAdapter;
import com.king.base.adapter.holder.ViewHolder;

import java.util.List;

import yt.kpool.R;

import yt.kpool.bean.MinerModelDetailsBean;
import yt.kpool.network.NetHelperNew;
import yt.kpool.util.imageUtil.GlideUtil;

public class HomeSecondAdapter extends ViewHolderAdapter<MinerModelDetailsBean.DataBean.CoinListBean> {


    public HomeSecondAdapter(Context context, List<MinerModelDetailsBean.DataBean.CoinListBean> listData) {
        super(context, listData);
    }

    @Override
    public View buildConvertView(LayoutInflater layoutInflater, MinerModelDetailsBean.DataBean.CoinListBean dataBean, int position) {
        return layoutInflater.inflate(R.layout.item_homeoneselect,null);
    }

    @Override
    public void bindViewDatas(ViewHolder holder, MinerModelDetailsBean.DataBean.CoinListBean s, int position) {

            holder.setText(R.id.tv_content,s.getCurrency().toUpperCase());
            ImageView iv=holder.getView(R.id.iv_icon);
            GlideUtil.loadImage(context, NetHelperNew.URL + s.getIcon(), iv, R.mipmap.ic_launcher, R.mipmap.ic_launcher);


//        TextView textView=holder.getView(R.id.tv_line);
//        if(holder.getAdapterPosition()==getListData().size()-1)
//        {
//            textView.setVisibility(View.GONE);
//        }


    }

}
